// 直接测试controller
const adminController = require('./controllers/adminController');

// 模拟req和res对象
const mockReq = {
  query: {
    page: '1',
    limit: '10',
    keyword: ''
  },
  userId: 1,
  userRole: 'admin'
};

const mockRes = {
  status: function(code) {
    this.statusCode = code;
    return this;
  },
  json: function(data) {
    console.log('=== 响应数据 ===');
    console.log(JSON.stringify(data, null, 2));
    process.exit(0);
  }
};

console.log('开始测试 getAllUsers...\n');
adminController.getAllUsers(mockReq, mockRes);

